﻿namespace Yom.WebService.Admin
{
    using System.Text;
    using System.Web;
    using Yom.Common;

    public class AdminIndex : AdminBase
    {
        public void OutWrite()
        {
            JsonModel Js = new JsonModel();
            StringBuilder builder = new StringBuilder();
            Js.Add("Title", "欢迎使用 YomComic");
            builder.Append("<div style=\"padding:5px;width:140px;margin-right:30px;position:absolute;\"><img alt=\"\" src=\"Images/Admin/ControlPanel.png\" /></div>");
            builder.Append("<div style=\"padding:5px;line-height:170%;clear:both;font-size:12px;width:240px;position:relative;left: 150px;\">");
            builder.Append("<b>当前软件版本:</b> YomComic V1.0 Beta<br/><b>软件更新日期:</b> 2009-03-06<br/>");
            builder.Append("<b>程序作者:</b> 带头盔滴衰锅<br /><b>作者主页:</b> <a href=\"http://www.yomhut.com\" target=\"_blank\">http://www.yomhut.com</a><br />");
            builder.Append("<b>分类数量:</b> " + new Yom.Data.Category().GetCount().ToString() + " 个<br />");
            builder.Append("<b>漫画数量:</b> " + new Yom.Data.Comic().GetCount().ToString() + " 篇<br />");
            Js.Add("Panel", builder.ToString());
            base.Response.Write(new Json(Js));
        }
    }
}